import request from '@/utils/request'

// 创建物料日志
export function createMaterialLog(data) {
  return request({
    url: '/hs/material-log/create',
    method: 'post',
    data: data
  })
}

// 更新物料日志
export function updateMaterialLog(data) {
  return request({
    url: '/hs/material-log/update',
    method: 'put',
    data: data
  })
}

// 删除物料日志
export function deleteMaterialLog(id) {
  return request({
    url: '/hs/material-log/delete?id=' + id,
    method: 'delete'
  })
}

// 获得物料日志
export function getMaterialLog(id) {
  return request({
    url: '/hs/material-log/get?id=' + id,
    method: 'get'
  })
}

// 获得物料日志分页
export function getMaterialLogPage(params) {
  return request({
    url: '/hs/material-log/page',
    method: 'get',
    params
  })
}
// 导出物料日志 Excel
export function exportMaterialLogExcel(params) {
  return request({
    url: '/hs/material-log/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}